home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 October / macformat-005.iso / Shareware City / Developers / MacVogl-alpha1PPC / valloc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-11  |  312 b   |  21 lines  |  [TEXT/????]

  1. #include "vogl.h"
  2.  
  3. /*
  4.  * vallocate
  5.  *
  6.  *    Allocate some memory, barfing if malloc returns NULL.
  7.  */
  8. char *
  9. vallocate(size)
  10.     unsigned    size;
  11. {
  12.     char    *p, buf[60];
  13.  
  14.     if ((p = (char *)malloc(size)) == (char *)0) {
  15.         sprintf(buf,"vallocate: request for %d bytes returned NULL", size);
  16.         verror(buf);
  17.     }
  18.  
  19.     return (p);
  20. }
  21.